import request from '@/utils/request'

// 查询出院记录列表 (分页)
export function selectPagePatDischarge(query) {
    return request({
        url: '/business/patDischarge/selectPage',
        method: 'get',
        params: query
    })
}

// 查询出院记录列表 (不分页)
export function listPatDischarge(query) {
    return request({
        url: '/business/patDischarge/list',
        method: 'get',
        params: query
    })
}

// 检查是否有出院前未执行的项目
export function checkNotDoneApplyMap(query) {
    return request({
        url: '/business/patDischarge/checkNotDoneApplyMap',
        method: 'get',
        params: query
    })
}

// 查询出院记录详细
export function getPatDischarge(patDischargeId) {
    return request({
        url: '/business/patDischarge/' + patDischargeId,
        method: 'get'
    })
}

// 新增出院记录
export function addPatDischarge(data) {
    return request({
        url: '/business/patDischarge',
        method: 'post',
        data: data
    })
}

// 护士站出院确认
export function savePatDischarge(data) {
    return request({
        url: '/business/patDischarge/savePatDischarge',
        method: 'post',
        data: data
    })
}

// 医嘱停止后出院
export function stopOrdersInPatDischarge(data) {
    return request({
        url: '/business/patDischarge/stopOrdersInPatDischarge',
        method: 'post',
        data: data
    })
}

// 修改出院记录
export function updatePatDischarge(data) {
    return request({
        url: '/business/patDischarge',
        method: 'put',
        data: data
    })
}

// 删除出院记录
export function delPatDischarge(patDischargeId) {
    return request({
        url: '/business/patDischarge/' + patDischargeId,
        method: 'delete'
    })
}
